import { createBrowserRouter, RouteObject } from "react-router-dom";

import WorkSpace from "../page/WorkSpace";
import DataEcharts from '../components/DataEcharts'
import GoodsList from "../components/GoodsList";
import Landing from "../page/Landing";
import AddGoods from "../components/AddGoods";
import Login from "../page/Login";
import Register from "../page/Register";
import ResetPass from "../page/ResetPassword";
import Modifygoods from "../Modifygoods";
import Modifygoodsdaohang from '../Modifygoodsdaohang.tsk';

const routes: RouteObject[] = [
    {
        path: "/WorkSpace",
        element: <WorkSpace></WorkSpace>,
        children: [
            {
                path: 'DataEcharts',
                element: <DataEcharts></DataEcharts>
            },
            {
                path: 'GoodsList',
                element: <GoodsList></GoodsList>,
            },
            {
                path: 'AddGoods',
                element: <AddGoods></AddGoods>
            } ,
            {
                path: 'Modifygoodsdaohang',
                element: <Modifygoodsdaohang></Modifygoodsdaohang>
            }
        
        ]
    },
    {
        path: '/',
        element: <Landing></Landing>,
    },
    {
        path: '/Login',
        element: <Login></Login>
    },
    {
        path: '/Register',
        element: <Register></Register>
    },
    {
        path: 'ResetPassWord',
        element: <ResetPass></ResetPass>
    }
    ,{
        path: 'Modifygoods',
        element: <Modifygoods></Modifygoods>
    }
    ,{
        path: 'Modifygoodsdaohang',
        element: <Modifygoodsdaohang></Modifygoodsdaohang>
    }
]

const router = createBrowserRouter(routes);

export default router;